package com.vhall.component.service.room.event.handler.live;

import com.vhall.component.service.room.event.handler.AbstractEventHandler;
import com.vhall.component.service.room.event.handler.EventHandlerType;
import com.vhall.component.service.room.event.handler.RedirectUtil;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

import java.util.Map;

import static com.vhall.component.service.room.event.EventConstant.LIVE_ROOM_JOIN_INFO_SYNC;

/**
 * 订阅直播访问记录查询任务完成 处理器
 *
 * @author jingwen.li
 * @date 2023/2/16
 */
@Slf4j
@Component
@EventHandlerType(LIVE_ROOM_JOIN_INFO_SYNC)
public class RoomJoinInfoSyncEventHandler extends AbstractEventHandler {

    @Autowired
    private RedirectUtil redirectUtil;
    @Value("${old.callback.live.url}")
    private String callbackUrl;

    @Override
    public void handle(Map<String, Object> callBack) {
//        redirectUtil.redirect(callbackUrl, callBack);
        log.info("收到订阅直播访问记录查询任务完成事件：{}, 事件详情：{}", LIVE_ROOM_JOIN_INFO_SYNC, callBack);
    }
}
